1. Field of the Invention
The present invention relates to a method of and an apparatus for converting a line graphic into a graphic having a curve therein.
2. Description of Prior Arts
In order to enable processing of a drawing such as a design drawing for machines or electric circuits, an automatic drawing input device is used for reading the drawing and producing its graphic data. The automatic drawing input device reads the drawing with a scanner for producing graphic data of a line graphic provided on the drawing, and converts the graphic data into those of a format easily treated by a computer.
The processes performed by the automatic drawing input device include a thinning process or a core-lining process of extracting only the center line of a line graphic, a form correction process of correcting disorder of a line graphic expressed by a center line, and a curve approximation process of approximating a bent part of a line graphic with a circular arc or a spline function, for example.
However, if the aforementioned form correction process is performed in advance of the curve approximation process, a bent part to be approximated with a curve may be erroneously recognized as disorder or defects of the line graphic and subjected to erroneous correction. FIGS. 7A-7C and 8A-8C are explanatory diagrams showing such cases where line graphics are erroneously corrected by the form correction process.
FIG. 7A shows an example wherein a center line extracted from a line graphic is approximated with line segments connecting points Q.sub.11 to Q.sub.14, and a form correction process and a curve approximation process are successively performed on this line. The section between the points Q.sub.12 and Q.sub.13 should be converted into a circular arc, as shown in FIG. 7B. However, if the form correction process is performed in advance of the curve approximation process, a set of points between the points Q.sub.12 and Q.sub.13 in FIG. 7A may be erroneously recognized as distortion of the graphic and replaced by two points Q.sub.12a and Q.sub.13a as shown in FIG. 7C. Consequently, the section between the points Q.sub.12a and Q.sub.12a is erroneously approximated with a line segment, and no curve part is recognized.
FIG. 8A shows an example wherein a center line extracted from an arcuate line graphic is approximated with line segments connecting points between points Q.sub.21 and Q.sub.22. While there is a line segment extending from a point Q.sub.23 to the arcuate line graphic, this segment is essentially unnecessary. In a form correction process, therefore, it is desirable that the point Q.sub.23 is removed and the line graphic is approximated with a curve as shown in FIG. 8B. As the result of the form correction process, however, the point Q.sub.23 and the adjacent line graphic points may be replaced by points Q.sub.24 and Q.sub.25, as shown in FIG. 8C. Consequently, the section between the points Q.sub.24 and Q.sub.25 is erroneously approximated with a straight line, whereas the section between the points Q.sub.21 and Q.sub.24 and that between the points Q.sub.25 and Q.sub.22 are approximated with circular arcs.
On the other hand, if the curve approximation process is performed in advance of the form correction process, data handling in the form correction process becomes complicated since the format of data expressing a straight line part is different from that of data expressing a part approximated with a curve.